#include "settings.h"


Settings::Settings(string filename)
{
	ifstream filestr(filename.c_str());
	if (filestr.is_open())
	{
		filestr.seekg(0,ios_base::beg);
		filestr >> width;
		filestr >> height;
		filestr >> color_depth;
		filestr >> num_tanks;
		filestr.close();
	}
	else //Failed!
	{
		width = 1024;
		height = 768;
		color_depth = 32;
		num_tanks = 4;
	}
}

int Settings::getWidth()
{
	return width;
}
int Settings::getHeight()
{
	return height;
}
int Settings::getColorDepth()
{
	return color_depth;
}
int Settings::getNumTanks()
{
	return num_tanks;
}
